#include <stdio.h>
#include <math.h>
int main() {
	double  x0, x;
	x0 = 1;
	x = (x0 + 2 / x0) / 2;
	while (fabs (x0 - x) >= 1e-5) {
		x0 = x;
		x = (x0 + 2 / x0) / 2;
	}
	printf ("root = %f", x);
}
